package org.jeecg.modules.car.mapper;

import com.baomidou.mybatisplus.annotation.SqlParser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.entity.basedata.BaseProject;
import org.jeecg.entity.car.CarPort;

import java.util.List;

/**
 * @Description: 车位管理
 * @Author: jeecg-boot
 * @Date:   2020-08-26
 * @Version: V1.0
 */
public interface CarPortMapper extends BaseMapper<CarPort> {

    public List<CarPort> getCarPortByCarParkId(@Param("parkId") String parkId);

    CarPort getByParkIdAndPortNum(@Param("parkId") String parkId,@Param("carportNum") String carportNum);

    List<CarPort> findPage(Page<CarPort> page,@Param("carPort") CarPort carPort);

    BaseProject getProjectByName(String projectName);

    @SqlParser(filter = true)
    CarPort queryById(@Param("id") String id,@Param("tenantId") String tenantId);

    List<CarPort> findByParkId(@Param("parkId") String parkId);

    List<CarPort> queryCarPortName(@Param("parkId") String parkId);
}
